import java.util.Arrays;

public class ReSort {
    public boolean CheckPermutation(String s1, String s2) {
        char[] chars1 = s1.toCharArray();
        char[] chars2 = s2.toCharArray();
        Arrays.sort(chars1);
        Arrays.sort(chars2);

        return String.valueOf(chars1).equals(String.valueOf(chars2));
    }

    public static void main(String[] args) {
        System.out.println(new ReSort().CheckPermutation("abc", "bca"));
    }
}
